import { request } from '@boeyo/portal';

//震前后健康评估列表
export const getPreAfterHealthList = async (params?: any) => {
  return request({
    url: '/healthEstimate/healthStructure',
    params,
    method: 'GET',
  });
};
//重新生成报告
export const getReGenerateReport = async (msgId) => {
  return request({
    url: `/healthEstimate/regenerateHealthReport/${msgId}`,
    method: 'GET',
  });
};

/**
 *
 * @param docType docType：pdf，docx
 * @param params 其他参数
 * @param closeDownload 预览还是直接下载
 * @returns
 */
export const getHealthReport = (
  docType: any,
  params: any,
  closeDownload?: boolean,
) => {
  return request({
    url: `/healthEstimate/healthReport/${docType}`,
    method: 'get',
    responseType: 'blob',
    params,
    closeDownload,
  });
};
